package com.zhukaoguan.boot11.mapper;

import com.github.pagehelper.PageInfo;
import com.zhukaoguan.boot11.entity.Food;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface FoodMapper {
    @Select("select * from food where type='招牌美食'")
    List<Food> select();
    @Insert("insert into food values(null,#{name},#{url},#{intro},#{type})")
    int insert(Food food);
    @Delete("delete from food where id=#{id}")
   int delete(int id);
    @Select("select * from food")
    List<Food> page(Integer pageNum,Integer pageSize);
}
